//
//  TableModel.m
//  List
//
//  Created by cocoazxj@163.com on 15/3/23.
//  Copyright (c) 2015年 handcool. All rights reserved.
//

#import "TableModel.h"

@implementation TableModel
- (instancetype)initWithDict:(NSDictionary *)dict
{
    self = [super init];
    if (self) {
        self.tip = dict[@"name"];
        self.icon = dict[@"icon"];
    }
    return self;
}

+(instancetype)tableModel:(NSDictionary *)dict
{
    return [[self alloc] initWithDict:dict];
}

-(UIImage *)image
{
    if (!_image) {
        _image = [UIImage imageNamed:self.icon];
    }
    return _image;
}
@end
